package com.csd.service.impl;

import com.csd.dao.CarListDao;
import com.csd.pojo.SysCar;
import com.csd.service.CarListSerivce;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ PACKAGE:com.csd.service.impl
 * @ Author:LiWenJin
 * @ Date:2020/12/23  20:32
 */
@Service
public class CarListServiceImpl implements CarListSerivce {
    @Autowired
    private CarListDao carListDao;

    @Override
    public List<SysCar> findPriceList(Integer cid) {
        List<SysCar> pList = carListDao.selectPriceList(cid);
        return pList;
    }

    @Override
    public List<SysCar> findNumberList(Integer cid) {
        List<SysCar> nList = carListDao.selectNumberList(cid);
        return nList;
    }

    @Override
    public SysCar findCarById(Integer id) {
        SysCar sysCar = carListDao.findByIdCar(id);
        return sysCar;
    }
}
